Use the pythagorean theorem to find the value of x